<template>
    <view class="component-get-action">
        <block v-if="order.listType == 't1' || order.listType == 't3' || (order.listType == 't2' && order.orderType == 1)">
            <view class="btn active" @click.stop="getOrder">
                <text>立即抢单</text>
            </view>
        </block>
        <block v-if="order.listType == 't2' && order.orderType == 2">
            <view class="btn active" @click.stop="postPrice">
                <text>立即报价</text>
            </view>
        </block>
    </view>
</template>

<script>
export default {
    name: "component-get-action",
    data() {
        return {
            models: this.$models,
        };
    },
    props: {
        date: {
            type: Object,
            default: () => {},
        },
    },
    props: {
        order: {
            type: Object,
            default: () => {},
        },
    },
    components: {},
    created() {},
    mounted() {},
    destroyed() {},
    methods: {
        getOrder() {
            this.$emit("getOrder");
        },
        postPrice() {
            this.$emit("postPrice");
        },
    },
};
</script>

<style lang="less" scoped>
.component-get-action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    .btn {
        display: block;
        font-size: 26rpx;
        padding: 16rpx 30rpx;
        line-height: 26rpx;
        border-radius: 30rpx;
        margin-left: 20rpx;
        color: #999999;
        box-sizing: border-box;
        border: 1px solid #999999;
    }
    .btn.active {
        color: #ffffff;
        background-color: #8b9beb;
        border: 1px solid #8b9beb;
    }
    .btn.normal {
        color: #999999;
        background-color: unset;
        padding: 0;
    }
}
</style>